<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="专题名称">
              <a-input placeholder="请输入专题名称" v-model="queryParam.subjectName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="专题编号">
              <a-input placeholder="请输入专题编号" v-model="queryParam.projectCode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目经理">
              <a-input placeholder="请输入项目经理" v-model="queryParam.charger"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys, onChange: onSelectChange, type: multiple ? 'checkbox':'radio'}"
        class="j-table-force-nowrap"
        @change="handleTableChange">
      </a-table>
    </div>
  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'

  export default {
    name: 'HfPmProjectQuestionChooseList',
    mixins:[JeecgListMixin, mixinDevice],
    props: {
      multiple: {
        type: Boolean,
        default: false
      }
    },
    data() {
        return {
          description: '问题表单表头选择页面',
          // 表头
          columns: [
            {
              title: '序号',
              dataIndex: '',
              key: 'rowIndex',
              width: 60,
              align: "center",
              customRender: function(t, r, index) {
                return parseInt(index) + 1;
              }
            },
            {
              title: '创建人',
              align: "center",
              dataIndex: 'createBy'
            },
            {
              title: '创建时间',
              align: "center",
              dataIndex: 'createTime',
              customRender: function(text) {
                return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
              }
            },
            {
              title: '项目简称',
              align: "center",
              dataIndex: 'projectName'
            },
            {
              title: '项目编号',
              align: "center",
              dataIndex: 'projectCode'
            },
            {
              title: '项目经理',
              align: "center",
              dataIndex: 'charger'
            },
            {
              title: '专题名称',
              align: "center",
              dataIndex: 'subjectName'
            },
            // {
            //   title: '专题主键',
            //   align: "center",
            //   dataIndex: 'subjectId'
            // },
            {
              title: '提出部门',
              align: "center",
              dataIndex: 'proposeDep'
            },
            {
              title: '提出人',
              align: "center",
              dataIndex: 'proposePersion'
            },
            {
              title: '联系方式',
              align: "center",
              dataIndex: 'contact'
            },
            {
              title: '预估人天',
              align: "center",
              dataIndex: 'estimateWorkday'
            },
            {
              title: '期望时间',
              align: "center",
              dataIndex: 'expectedTime'
            },
            {
              title: '责任人',
              align: "center",
              dataIndex: 'dutyPersion'
            },
            {
              title: '处理方式',
              align: "center",
              dataIndex: 'dealType_dictText'
            },
            {
              title: '项目主键',
              align: "center",
              dataIndex: 'projectId'
            }
          ],
          url: {
            list: "/pm/hfPmProjectQuestionChoose/list"
          },
          dictOptions: {},
          superFieldList: [],
        }
      },
    methods: {
    }
  }
</script>
<style scoped>
    @import '~@assets/less/common.less';
</style>